import { httpPost, httpGet } from '@/utils/http'

// 定义 UserAgreementResponse 类型
export interface UserAgreementResponse {
  data: {
    title: string
    content: string
  }
}

//  获取用户服务协议
export const getUserAgreementAPI = () => {
  return httpGet<UserAgreementResponse>('/v1/api/open/service')
}

// 获取隐私政策
export const getPrivacyPolicyAPI = () => {
  return httpGet<UserAgreementResponse>('/v1/api/open/privacy')
}
/**
 * 发送身份验证请求到后端
 * @param name - 员工姓名
 * @param cell - 手机号码
 * @param idnumber - 身份证号码
 */
export const postVerifyIdentityAPI = (name: string, cell: string, idnumber: string) => {
  return httpPost('/v1/api/auth/getauthurl', { name, cell, idnumber })
}
